﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace VISS.API.Users {

    /// <summary>
    /// This interface is used for VISS.VN
    /// Used this interface to implement operations on UserImage table
    /// </summary>
    public interface IUserImage {

        /// <summary>
        /// Insert an new image for a user
        /// </summary>
        /// <param name="item">The UserImageEnt item.</param>
        /// <returns>Return true if success, otherwise return false</returns>
        bool Insert(UserImageEnt item);

        /// <summary>
        /// Delete an image of a user
        /// </summary>
        /// <param name="iD">The image ID.</param>
        /// <param name="userKey">The user key.</param>
        /// <returns>
        /// Return true if success, otherwise return false
        /// </returns>
        bool Delete(long iD, string userKey);

        /// <summary>
        /// Get all image of a user
        /// </summary>
        /// <param name="userKey">The user key.</param>
        /// <returns>Return list of UserImageEnt if exists, otherwise return empty list</returns>
        List<UserImageEnt> GetByUserKey(string userKey);
        /// <summary>
        /// Get a single image of a user
        /// </summary>
        /// <param name="userKey">The user key.</param>
        /// <param name="iD">The image ID.</param>
        /// <returns>Return UserImageEnt if exists, otherwise return null</returns>
        UserImageEnt GetByUserKeyAndID(string userKey, long iD);
        /// <summary>
        /// Get images of user with paging
        /// </summary>
        /// <param name="userKey">The user key.</param>
        /// <param name="page">The page number.</param>
        /// <param name="recordPerPage">The record per page.</param>
        /// <param name="totalRecord">The total record.</param>
        /// <returns>Return list of UserImageEnt if exists, otherwise return empty list</returns>
        List<UserImageEnt> GetByUserKeyWithPaging(string userKey, int page, int recordPerPage, out int totalRecord);
        /// <summary>
        /// Get image count of a user
        /// </summary>
        /// <param name="userKey">The user key.</param>
        /// <returns>Return count number of messages</returns>
        int GetCountByUserKey(string userKey);
    }
}
